package com.matrix.common.enums;

import lombok.Getter;

/**
 * @author 有点甜
 * @since 2025/7/25
 */
@Getter
public enum ErrorCode {
    SUCCESS(200, "操作成功"),
    PARAMS_ERROR(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权,请先登录"),
    FORBIDDEN(403, "没有操作权限"),
    NOT_FOUND(404, "请求资源不存在"),
    SYSTEM_ERROR(500, "服务器内部错误"),
    BUSINESS_ERROR(1001, "业务异常");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
